{% extends 'base.html' %}

{% block title %}
    <title>注册</title>
{% endblock %}

{% block cssjs %}
    <link rel="stylesheet" href="/static/css/register.css" type="text/css">

    <script src="/static/js/register.js"></script>
    <script src="/static/js/goods_info.js"></script>
    <script src="/static/js/goods_info2.js"></script>
{% endblock %}


{% block cart %}

    <div class="bag">
        <a href="{% url 'carts:cart' %}">
            <div class="bag_n">
            <img src="/static/img/shopping.png" class="bag_icon" alt="" />
            <span>购物袋（<t style="color: #8E0C3A;">0</t>）</span>
            <img class="arrow" src="/static/img/xiabiao.png" alt="" />
        </div>
        </a>


        <div class="cart">
            <div class="cart_n">
                您的购物车是空的
            </div>
        </div>
    </div>

{% endblock %}
{% block main %}

<div class="content">
    <div class="content_box">
        <div class="absolute">
            <img src="/static/img/register_bg.png" alt="" />
        </div>
        <p class="voucher">手机验证完成即送<b>100</b>元代金券</p>
        <form class="registerform" method="post">
            <div class="register_box">
                <div class="input_zone">
                    <div class="input_l"><i>手机/邮箱：</i></div>
                    <div class="input_r">
                        <input type="text" name="username" class="user_name" value="手机注册更享好礼" style="color: rgb(204, 204, 204);font-size: 12px;"/>
                    </div>
                </div>
                <div class="input_zone">
                    <div class="input_l"><i>密&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;码：</i></div>
                    <div class="input_r">
                        <input type="password" class="psw1" name="pwd"/>
                    </div>
                </div>
                <div class="input_zone">
                    <div class="input_l"><i>确认 密码：</i></div>
                    <div class="input_r">
                        <input type="password" class="psw2" name="pwd2"/>
                    </div>
                </div>

                <div class="input_zone">
                    <div class="input_l"><i>图片验证码:</i></div>
                    <div class="input_r">
                        <input name="imgcode" type="text" class="form-control" id="img" placeholder="图片验证码" style="width:80px">&nbsp;
                        <img src="/imagecode/" alt="" style="width: 90px;" id="imgcode">
                    </div>

                </div>

                <div class="meici_tag">
                    <input class="input_small_l" type="checkbox" value="1" />
                    <span style="color: #6C6C6C;display: inline-block;">订阅美西时尚资讯</span>
                </div>
                <div class="meici_tag">
                    <button class="btn_register" >注册</button>
                    <br />
                    <div style="margin-top: 5px;text-align: right;">
                        已注册？
                        <a href="{% url 'index:login' %}" style="color: #8E0C3A;">登录</a>
                    </div>
                    <p class="regInfo_msg"></p>
                </div>
            </div>
            {% csrf_token %}
        </form>
    </div>
</div>

    <script>
    $(function () {
        $('#imgcode').click(function () {
            var r = Math.random();
            $(this).attr('src', '/imagecode/?' + r)

        });
    })


    </script>

{% endblock %}

